package com.trkj.usercenter.star;

import android.util.Log;

import com.trkj.base.Constants;
import com.trkj.base.User;
import com.trkj.base.utils.UserService;
import com.trkj.widget.refresh.SwipeRefreshLayout;

import java.text.MessageFormat;

/**
 * Created by LiZanhong on 2015/06/25.
 */
public class MyStarFragment extends AllStarFragment {
    public int getUid() {
        User user= UserService.getInstance(this.getActivity()).parseUser();
        return user == null ? 0 : user.userId;
    }

    @Override
    public String getUrl() {
        String url = MessageFormat.format(
                Constants.ApiUrl.MY_STAR,
                getUid());
        Log.i("URL", url);
        return url;
    }

    @Override
    protected SwipeRefreshLayout.Mode getMode() {
        return SwipeRefreshLayout.Mode.PULL_FROM_START;
    }
}
